function Legion(obj) {
	
	this.x = obj.x;
	this.y = obj.y;
	this.row = obj.row;
	this.col = obj.col;
	this.armyType = obj.armyType;
	this.soldiers = new Array();

	for(var i=0;i<this.row;i++) {
		for(var j=0;j<this.col;j++) {
				var obj = {};
				obj.img = resources.hubao.image;
				obj.frameRate = 60;
				obj.frames = 5;
				obj.x = this.x+i*(obj.img.width/obj.frames -70);
				obj.y = this.y+j*(obj.img.height -70);

				var soldier = new Animate(obj);
				
				this.soldiers.push(soldier);
		}	
	}
}

Legion.prototype.draw = function(ctx) {
	for(var i=0;i<this.soldiers.length;i++) {
		this.soldiers[i].draw(ctx);
	}
}

Legion.prototype.enterFrame = function(dt) {
	for(var i=0;i<this.soldiers.length;i++) {
		this.soldiers[i].enterFrame(dt);
	}
}